package com.tuni.birthdaymoney.persistence.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.querydsl.QueryDslPredicateExecutor;

import com.tuni.birthdaymoney.persistence.entity.Message;
import com.tuni.birthdaymoney.persistence.entity.Message.EmailType;
import com.tuni.birthdaymoney.persistence.entity.Person;

public interface MessageRepository extends JpaRepository<Message, Integer>, QueryDslPredicateExecutor<Message> {
    public List<Message> findByTypeAndBirthdayManAndBirthdayYear(EmailType type, Person birthdayMan, int birthdayYear);
}